package com.katus.tileserver.controller;

import com.katus.tileserver.bean.Result;
import com.katus.tileserver.dao.ProgramDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author jiarui
 * @version 1.0, 2022-11-21
 */

@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/program")
public class ProgramController {

    @Autowired
    ProgramDao programDao;

    @RequestMapping(value = "/info", method = RequestMethod.GET)
    @ResponseBody
    public Result getInfo(Integer id) {
        return Result.success().setMessage("成功").setBody(programDao.getInfo(id));
    }
}
